<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			var str1=new String("abc123")
			var str2="abc123";
			
			console.log(str1.length)
			//字符串的查找
			var str3="adsfadsf man adsfadsf12431432522 man woman123"
			console.log(str3.charAt(2));
			console.log(str3.indexOf("man",15))//从位置15往后找
			console.log(str3.lastIndexOf("man"));//从后往前
		//字符串的截取
		var str4="abcdefghijk";
		//slice开始的索引，终止的索引
		console.log(str4.slice(3,7));
		//substr开始的索引，终止的长度
		console.log(str4.substr(3,4));
		console.log(str4.substring(3,7));
		</script>
	</body>
</html>